package com.yunji.storage.consumer;

import com.yunji.base.domain.BelongDO;
import com.yunji.base.provide.BaseDataBelongProvide;
import com.yunji.cabinet.provide.CabinetProvide;
import com.yunji.cabinet.vo.CellProductCountVO;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;


/**
 * @Project: yunji-coffee
 * @Package: com.yunji.storage.consumer
 * @Title: StockConsumer
 * <p>
 * History:
 * Date                     Version     Author          Summary
 * ============================================================
 * 2024-10-23 17:27:33      V1.0        HuaAo       新建类
 */
@Component
public class StockConsumer {

    @Resource
    BaseDataBelongProvide belongProvide;

    @Resource
    CabinetProvide cabinetProvide;

    public void updateBelong(BelongDO update) {
        belongProvide.updateBelong(update);
    }

    public Integer getStockStatus(Long belongId) {
        return belongProvide.selectStockStatus(belongId);
    }

    public List<CellProductCountVO> countCellProduct(Long belongId) {
        return cabinetProvide.countCellProduct(belongId);
    }
}